/* 
 * File:   plantconstantstest.cpp
 * Author: dolphinigle
 *
 * Created on March 11, 2011, 2:26 PM
 */

#include <stdlib.h>
#include "gtest/gtest.h"
#include "plantconstants.hpp"
#include "fruitconstants.hpp"
#include "season.hpp"

TEST(PlantConstantsTest, Consistency) {
  EXPECT_TRUE(PlantConstants::getPlantCount() >= 0);
  for (int i = 0; i < PlantConstants::getPlantCount(); ++i) {
    EXPECT_NE(PlantConstants::getPlantName(i), "_");
    EXPECT_GE(PlantConstants::getPlantMatureTime(i), 0);
    EXPECT_GE(PlantConstants::getPlantRipeTime(i, i), 0);
    EXPECT_GE(PlantConstants::getPlantDeadTime(i), 0);
    EXPECT_GE(PlantConstants::getPlantHarvestType(i), 0);
    EXPECT_GE(PlantConstants::getFruitId(i), 0);
    EXPECT_LT(PlantConstants::getFruitId(i), FruitConstants::getFruitCount());
    EXPECT_GE(PlantConstants::getPlantSeasonMask(i), 0);
    EXPECT_LT(PlantConstants::getPlantSeasonMask(i), 1 << Season::getSeasonCount());
  }
}
